// Here we avoid loading the header multiple times
#ifndef AKICHANNELSTAT_HEADER
#define AKICHANNELSTAT_HEADER

#include <plasma/popupapplet.h>
#include <Aki/Irc/Socket>

class QSizeF;
class QAction;
class QGraphicsLinearLayout;
class QListWidget;
class QListWidgetItem;
//Plasma for the GUI part
namespace Plasma
{
  /* class FlashingLabel; */
  class PushButton;
  class Label;
  class LineEdit;
  class TextEdit;
}

//Aki for the IRC part 
/** 
 * Dunno What you think of it but to me it looks a bit scatterd -.-
 * But yes this is in general how the aki API is build up.
 */
using namespace Aki::Irc;

class Socket;


// Define our plasma Applet
class akichannelstat : public Plasma::PopupApplet
{
  Q_OBJECT
    public:
 
        akichannelstat(QObject *parent, const QVariantList &args);
        ~akichannelstat();
        
	Aki::Irc::Socket *socket;

 public Q_SLOTS:
	void testClicked();
	void connectStatus(QAbstractSocket::SocketState state);
	void unconnected();
	void lookingUpHost();
	void connecting();
	void connected();
	void bound();
	void internal();
	void closing();
 signals:
	void isUnconnected();
	void isLookingUphost();
	void isConnecting(); 
	void isConnected();
	void isBound();
	void isInternal();
	void isClosing();
 private: 
	virtual QGraphicsWidget *graphicsWidget();
	QGraphicsWidget         *m_widget;
	QGraphicsLinearLayout   *m_layout;
	QGraphicsLinearLayout   *adressLayout;
	QGraphicsLinearLayout   *nickLayout;
	QGraphicsLinearLayout   *channelLayout;
	QTime                   *time;
	
	Plasma::Label           *plasmoidTitle;
	Plasma::Label           *adressLabel;
	Plasma::Label           *nickLabel;
	Plasma::Label           *channelLabel;

	Plasma::LineEdit        *adressEdit;
	Plasma::LineEdit        *nickEdit;
	Plasma::LineEdit        *channelEdit;
	
	Plasma::PushButton      *startTest;
	Plasma::TextEdit        *ResultLog;
};

// This is the command that links your applet to the .desktop file
K_EXPORT_PLASMA_APPLET(akichannelstat, akichannelstat)
#endif
